/**
 * 路由
 */
define(function(require, exports, module) {
	"use strict";

	const router = new VueRouter({
		base: seajs.root,
		linkActiveClass: 'active',
		linkExactActiveClass: 'active',
		routes: [{
			name: 'index',
			path: '/index',
			component: function (resolve, reject) {
				require.async('template/index', function(data){
					resolve(data);
				});
			}
		},{
			name: 'organization',
			path: '/organization',
			component: function (resolve, reject) {
				require.async('template/organization', function(data){
					resolve(data);
				});
			},
			children: [{
				name: 'channel',
				path: '/organization/channel/:id',
				component: function (resolve, reject) {
					require.async('template/channel', function(data){
						resolve(data);
					});
				}
			},{
				path:'/organization',
				redirect: '/organization/channel/1?favorite=aa'
			}]
		},{
			name: 'solution',
			path: '/solution',
			component: function (resolve, reject) {
				require.async('template/solution', function(data){
					resolve(data);
				});
			}
		},{
			name: 'career',
			path: '/career',
			component: function (resolve, reject) {
				require.async('template/career', function(data){
					resolve(data);
				});
			}
		},{
			name: 'case',
			path: '/case',
			component: function (resolve, reject) {
				require.async('template/case', function(data){
					resolve(data);
				});
			}
		},{
			name: 'research',
			path: '/research',
			component: function (resolve, reject) {
				require.async('template/research', function(data){
					resolve(data);
				});
			}
		},{
			name: 'news',
			path: '/news',
			component: function (resolve, reject) {
				require.async('template/news', function(data){
					resolve(data);
				});
			}
		},{
			name: 'contact',
			path: '/contact',
			component: function (resolve, reject) {
				require.async('template/contact', function(data){
					resolve(data);
				});
			}
		},{
			path: '*',
			redirect: '/index'
		}]
	});
	
	module.exports = router;
	
});